home *** CD-ROM | disk | FTP | other *** search
/ Game Power / Game Power Vol. 1 (HEPP Computer) (1995).iso / S224 / INSTALL.BAT < prev    next >
DOS Batch File  |  1994-11-28  |  4KB  |  152 lines

  1. @echo off
  2. cls
  3.  
  4. if not exist jb.exe goto noFile
  5.  
  6. if "%1" == "" goto help
  7. if "%2" == "" goto noPath
  8.  
  9. if errorlevel 1 goto errorMsg
  10.  
  11. :path
  12.  
  13. for %%A in (A B C D E F G H I J K L a b c d e f g h i j k l) do if !%1 == !%%A goto okay1
  14. goto help
  15.  
  16. :okay1
  17.  
  18. for %%A in ( : \ ) do if !%2 == !%%A goto help
  19.  
  20. echo .                         INSTALLING TO DRIVE %1:\%2
  21. echo .
  22. echo .                      OPERATION JUST BECAUSE INSTALLATION
  23. echo .
  24. md %1:\%2
  25. echo .                                COPYING FILES
  26. copy  *.exe %1:\%2
  27. goto success1
  28.  
  29. :noPath
  30.  
  31. for %%A in (A B C D E F G H I J K L a b c d e f g h i j k l) do if !%1 == !%%A goto okay
  32.  
  33. goto help
  34.  
  35. :okay
  36.  
  37. for %%A in (\ :) do if !%1 == !%%A goto help
  38.  
  39. echo .                         INSTALLING TO DRIVE %1:\OJB
  40. echo .
  41. echo .                      OPERATION JUST BECAUSE INSTALLATION
  42. echo .
  43. md %1:\OJB
  44. echo .                                COPYING FILES
  45. copy  *.exe %1:\OJB
  46.  
  47. if errorlevel 1 goto errorMsg
  48.  
  49. goto success2
  50.  
  51. :help
  52. cls
  53. @echo off
  54. echo .
  55. echo .                    OPERATION JUST BECAUSE INSTALL UTILITY
  56. echo .
  57. echo .    This program must be installed on a hard drive.  To install this
  58. echo .    program on C drive, you would type "INSTALL C".  This will put the
  59. echo .    game in the directory "OJB".  If you wish to install this
  60. echo .    game to a different directory, type "INSTALL C name of directory"
  61. echo .
  62. echo .    EXAMPLE: to install to D drive in the directory GAMES type......
  63. echo .
  64. echo                             "INSTALL D GAMES"
  65. goto end
  66.  
  67. :noFile
  68. cls
  69. echo .
  70. echo .              AN ERROR HAS OCCURRED, INSTALLATION WAS UNSUCCESSFUL
  71. echo .
  72. echo .    Sorry, the file "jb.exe" is not on this disk.  This file must
  73. echo .    be available in this directory to attempt installation of this game.
  74. echo .    Please check all directories for this file.  If found copy it to this
  75. echo .    directory and type "INSTALL" to continue.
  76.  
  77. goto end
  78.  
  79. :msg
  80. cls
  81. echo .              AN ERROR HAS OCCURRED, INSTALLATION WAS UNSUCCESSFUL
  82. echo .
  83. echo .    Sorry, at least one file required to run OPERATION JUST BECAUSE is missing.
  84. echo .    The disk may be too full to allow for all files to be decompressed or
  85. echo .    your souce disk may be bad. You must have at least 2.5 mega bytes of
  86. echo .    Hard Disk space for successful installation.
  87. goto  end
  88.  
  89. :errorMsg
  90. cls
  91. echo .
  92. echo .
  93. echo .              AN ERROR HAS OCCURRED, INSTALLATION WAS UNSUCCESSFUL
  94.  
  95. goto end
  96.  
  97. :success1
  98.  
  99. cls
  100. echo .
  101. echo .
  102. echo .                             DECOMPRESSING FILES
  103. echo .
  104. %1:
  105. cd %1:\%2
  106. if not exist jb.exe goto errorMsg
  107. jb.exe
  108.  
  109. @echo off
  110. cls
  111. if not exist OJB.L goto msg
  112.  
  113. goto installComplete
  114.  
  115. :success2
  116.  
  117. cls
  118. echo .
  119. echo .
  120. echo .                             DECOMPRESSING FILES
  121. echo .
  122. %1:
  123. cd %1:\OJB
  124. if not exist jb.exe goto errorMsg
  125. jb.exe
  126.  
  127. @echo off
  128. cls
  129. if not exist OJB.L goto msg
  130.  
  131. :installComplete
  132.  
  133. echo .
  134. echo .
  135. echo .                           INSTALLATION COMPLETE
  136. echo .                  TYPE "OJB" TO RUN OPERATION JUST BECAUSE
  137. echo .                                    or
  138. echo .                 "GAMEBOOK" TO READ THE GAME DOCUMENTATION
  139. echo .
  140. echo .
  141. echo .   TO RUN THIS GAME IN THE FUTURE YOU NEED TO CHANGE TO THE DIRECTORY
  142. echo .   THAT THE GAME WAS INSTALLED TO THEN TYPE "OJB" AND PRESS ENTER
  143. echo .
  144. echo .   EXAMPLE WITH THE GAME INSTALLED TO THE DIRECTORY "OJB".  AFTER
  145. echo .   YOUR COMPUTER BOOTS UP, TYPE "CD\OJB", THEN PRESS ENTER. TYPE 
  146. echo .   "OJB" AND PRESS ENTER.  IF THIS GAME WAS INSTALLED TO A 
  147. echo .   DIRECTORY OTHER THAN OJB, SUBSTITUTE THAT DIRECTORY NAME FOR 
  148. echo .   OJB IN THE STATEMENT "CD\OJB".
  149. echo .
  150. del jb.exe
  151. :end
  152.